<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=yes">
    <title>下拉刷新/上拉加载-适用于移动端</title>
    <link rel="stylesheet" href="../css/base.css">
    <link rel="stylesheet" href="css/LoadTop.css">
    <link rel="stylesheet" href="css/LoadBtm.css">
</head>
<body>
<style>
    .container {
        width: 400px;
        height: 600px;
        border: 1px solid red;
        margin: 0;
        margin-left: 20px;
        position: relative;
    }
</style>

<div class="container">
    <div class="Load-Top">
        <img src="image/load.gif" class="image">
        <span class="text"></span>
    </div>

    <div class="Load-Btm hide">
        <img src="image/load.gif" class="image">
        <span class="text">加载中</span>
    </div>
</div>

<script src="../SmallJs/SmallJs.js"></script>
<script src="js/LoadTop.js"></script>
<script src="js/LoadBtm.js"></script>
<script>
    var c = G('.container');

    var lt = new LoadTop(c.get(0) , {
        status: 'show' ,
        text: '正在加载' ,
        load: function(){
            window.setTimeout(this.hide.bind(this) , 3000);
        }
    });

    // 请求
    window.setTimeout(function(){
        lt.hide();
    } , 3000);

    var lb = new LoadBtm(c.get(0) , {
        status: 'show'
    });


</script>
</body>
</html>